<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
  <link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css">
  <title>江西省水土保持监测站点监测管理系统</title>
  <script>

    let usework = 120;//打包120
    var globalVar = {
      requestbaseURL: 'http://192.168.80.94:8801',
      rijiangyubaseURL: 'http://192.168.80.94:8802',
      xiaoliuyubaseURL: 'http://192.168.80.94:8803',
      xiaoliuyujiangyuUrl: 'http://192.168.80.94:8803',
      jingliujiangyuUrl: 'http://192.168.80.94:8802',
      tiaozhuanUrl: 'http://192.168.53.181:9000/#/login'
    }
    switch (usework) {
      case 120:
        globalVar.picShowURL = 'http://120.203.64.203:5888/stbc_static';
        globalVar.requestbaseURL = 'http://120.203.64.203:5888'
        globalVar.rijiangyubaseURL = 'http://120.203.64.203:5888'
        globalVar.xiaoliuyubaseURL = 'http://120.203.64.203:5888'
        globalVar.xiaoliuyujiangyuUrl = 'http://120.203.64.203:5888'
        globalVar.jingliujiangyuUrl = 'http://120.203.64.203:5888'
        //globalVar.tiaozhuanUrl = 'http://192.168.220.144:9001/#/login'
        globalVar.tiaozhuanUrl = 'http://120.203.64.203:5888/stbc/web/#/login'
        break;
      case 196:
        globalVar.requestbaseURL = 'http://192.168.220.124:8801';
        //globalVar.rijiangyubaseURL = 'http://192.168.220.124:8802';
        globalVar.rijiangyubaseURL = 'http://120.203.64.203:5888';
        globalVar.xiaoliuyubaseURL = 'http://192.168.220.124:8804';
        globalVar.picShowURL = 'http://192.168.220.124:8989/stbc_static';
        globalVar.xiaoliuyujiangyuUrl = 'http://192.168.220.124:8803';
        globalVar.jingliujiangyuUrl = 'http://192.168.220.124:8804';
        globalVar.tiaozhuanUrl = 'http://192.168.220.144:9001/#/login'
        break;
    }


    let dataDot = [{
      jingdudufenmiao: '115°41′3"',
      weidudufenmiao: '29°16′5"',
      areacode: 'FH3621216140',
      name: '江西省德安县燕沟小流域坡面径流场',
      strDu: 115,
      strFen: 41,
      strMiao: 3,
      strDu1: 29,
      strFen1: 16,
      strMiao1: 5
    }, {
      jingdudufenmiao: '114°1′57"',
      weidudufenmiao: '29°4′42"',
      areacode: 'FH3620914140',
      name: '修水县清水桥坡面径流观测场',
      strDu: 114,
      strFen: 1,
      strMiao: 57,
      strDu1: 29,
      strFen1: 4,
      strMiao1: 42
    }, {
      jingdudufenmiao: '115°20′33"',
      weidudufenmiao: '28°39′35"',
      areacode: 'FH3620814140',
      name: '江西省奉新县赤岸坡面径流观测场',
      strDu: 115,
      strFen: 20,
      strMiao: 33,
      strDu1: 28,
      strFen1: 39,
      strMiao1: 35
    }, {
      jingdudufenmiao: '115°20′33"',
      weidudufenmiao: '28°39′35"',
      areacode: 'FH3620814140',
      name: '江西省奉新县中堡港小流域控制站',
      strDu: 115,
      strFen: 20,
      strMiao: 33,
      strDu1: 28,
      strFen1: 39,
      strMiao1: 35
    }, {
      jingdudufenmiao: '114°53′3"',
      weidudufenmiao: '26°50′26"',
      areacode: 'FH3620133140',
      name: '江西省泰和县老虎山小流域综合观测站',
      strDu: 114,
      strFen: 53,
      strMiao: 3,
      strDu1: 26,
      strFen1: 50,
      strMiao1: 26
    }, {
      jingdudufenmiao: '114°51′53"',
      weidudufenmiao: '26°54′55"',
      areacode: 'FH3621114140',
      name: '江西省吉州区官溪坡面径流观测场',
      strDu: 114,
      strFen: 51,
      strMiao: 53,
      strDu1: 26,
      strFen1: 54,
      strMiao1: 55
    }, {
      jingdudufenmiao: '115°16′45"',
      weidudufenmiao: '26°16′15"',
      areacode: 'FH3621314140',
      name: '兴国县黄金坪坡面径流观测场',
      strDu: 115,
      strFen: 16,
      strMiao: 45,
      strDu1: 26,
      strFen1: 16,
      strMiao1: 15
    }, {
      jingdudufenmiao: '115°16′45"',
      weidudufenmiao: '26°16′15"',
      areacode: 'FH3621314140',
      name: '兴国县蕉溪河小流域控制站',
      strDu: 115,
      strFen: 16,
      strMiao: 45,
      strDu1: 26,
      strFen1: 16,
      strMiao1: 15
    }, {
      jingdudufenmiao: '114°31′14"',
      weidudufenmiao: '25°52′38"',
      areacode: 'FH3620414140',
      name: '江西省上犹县水村坡面径流观测场',
      strDu: 114,
      strFen: 31,
      strMiao: 14,
      strDu1: 25,
      strFen1: 52,
      strMiao1: 38
    }, {
      jingdudufenmiao: '116°17′6"',
      weidudufenmiao: '26°45′47"',
      areacode: 'FH3620514140',
      name: '江西省广昌县罗田坡面径流观测场',
      strDu: 116,
      strFen: 17,
      strMiao: 6,
      strDu1: 26,
      strFen1: 45,
      strMiao1: 47
    }, {
      jingdudufenmiao: '117°41′23"',
      weidudufenmiao: '29°12′40"',
      areacode: 'FH3620714140',
      name: '江西省婺源县中云坡面径流观测场',
      strDu: 117,
      strFen: 41,
      strMiao: 23,
      strDu1: 29,
      strFen1: 12,
      strMiao1: 40
    }, {
      jingdudufenmiao: '117°25′36"',
      weidudufenmiao: '28°32′55"',
      areacode: 'FH3620614140',
      name: '江西省弋阳县上张坡面径流场',
      strDu: 117,
      strFen: 25,
      strMiao: 36,
      strDu1: 28,
      strFen1: 32,
      strMiao1: 55
    }, {
      jingdudufenmiao: '118°8′48"',
      weidudufenmiao: '28°37′53"',
      areacode: 'FH3620324140',
      name: '江西省玉山县金桥小流域控制站',
      strDu: 118,
      strFen: 8,
      strMiao: 48,
      strDu1: 28,
      strFen1: 37,
      strMiao1: 53
    }, {
      jingdudufenmiao: '115°35′31"',
      weidudufenmiao: '28°46′19"',
      areacode: 'FH3621013140',
      name: '江西省安义县长垅坡面径流场',
      strDu: 115,
      strFen: 35,
      strMiao: 31,
      strDu1: 28,
      strFen1: 46,
      strMiao1: 19
    }]
    let newdata = dataDot.map(item => {
      item.jingdu = ToDigital(item.strDu, item.strFen, item.strMiao)
      item.weidu = ToDigital(item.strDu1, item.strFen1, item.strMiao1)
      return item
    })

    //度°分′秒″转度
    function ToDigital(strDu, strFen, strMiao, len) {
      len = (len > 6 || typeof (len) == "undefined") ? 6 : len; //精确到小数点后最多六位   
      strDu = (typeof (strDu) == "undefined" || strDu == "") ? 0 : parseFloat(strDu);
      strFen = (typeof (strFen) == "undefined" || strFen == "") ? 0 : parseFloat(strFen) / 60;
      strMiao = (typeof (strMiao) == "undefined" || strMiao == "") ? 0 : parseFloat(strMiao) / 3600;
      var digital = strDu + strFen + strMiao;
      if (digital == 0) {
        return "";
      } else {
        return digital.toFixed(len);
      }
    }
    var checkArr = [
      { dictItemCode: "ZD-000004-R1", dictItemValue: "R1", dictCode: "ZD-000004", itemRemark: "日降雨审批" },
      { dictItemCode: "ZD-000004-R2", dictItemValue: "R2", dictCode: "ZD-000004", itemRemark: "田间管理审批" },
      { dictItemCode: "ZD-000004-R3", dictItemValue: "R3", dictCode: "ZD-000004", itemRemark: "泥沙采样审批" },
      { dictItemCode: "ZD-000004-R4", dictItemValue: "R4", dictCode: "ZD-000004", itemRemark: "郁闭度审批" },
      { dictItemCode: "ZD-000004-R5", dictItemValue: "R5", dictCode: "ZD-000004", itemRemark: "作物测产审批" }
    ]

    console.log(checkArr)

    // 页面加载完成
    var Authorization = '';
    var stationInfo = {

    }
    var systype = '1'

    function GetQueryString(name) {
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");

      var r = decodeURIComponent(window.location.hash).substr(11).match(reg);

      if (r != null) return unescape(r[2]); return null;
    }
    //  Number.prototype.toFixed = function(s)
    //  {
    //    let res = (Math.round(this * Math.pow( 10, s ) )/ Math.pow( 10, s )).toString();
    // console.log(res,'??????????????????????')
    //    res.split('.')[1]?0:res+='.'
    //    res.split('.')[1].length<s? res+=(Math.pow( 10, s- res.split('.')[1].length )+'').substr(1):''
    //    return res
    //  }
    Number.prototype.toFixed = function (n) {
      // n为期望保留的位数，超过限定，报错！
      if (n > 20 || n < 0) {
        throw new RangeError('toFixed() digits argument must be between 0 and 20');
      }
      // 获取数字
      const number = this;
      // 如果是NaN,或者数字过大，直接返回'NaN'或者类似'1e+21'的科学计数法字符串
      if (isNaN(number) || number >= Math.pow(10, 21)) {
        return number.toString();
      }
      // 默认保留整数
      if (typeof (n) == 'undefined' || n == 0) {
        return (Math.round(number)).toString();
      }

      // 先获取字符串
      let result = number.toString();
      // 获取小数部分
      const arr = result.split('.');

      // 整数的情况，直接在后面加上对应个数的0即可
      if (arr.length < 2) {
        result += '.';
        for (let i = 0; i < n; i += 1) {
          result += '0';
        }
        return result;
      }

      // 整数和小数
      const integer = arr[0];
      const decimal = arr[1];
      // 如果已经符合要求位数，直接返回
      if (decimal.length == n) {
        return result;
      }
      // 如果小于指定的位数，补上
      if (decimal.length < n) {
        for (let i = 0; i < n - decimal.length; i += 1) {
          result += '0';
        }
        return result;
      }
      // 如果到这里还没结束，说明原有小数位多于指定的n位
      // 先直接截取对应的位数
      result = integer + '.' + decimal.substr(0, n);
      // 获取后面的一位
      let last = decimal.substr(n, 1);
      if (/^\d(9){5,}[89]$/.test(decimal.substr(n))) {
        last += last + 1;
      }
      // 大于等于5统一进一位
      if (parseInt(last, 10) >= 5) {
        // 转换倍数，转换为整数后，再进行四舍五入
        const x = Math.pow(10, n);
        // 进一位后，转化还原为小数
        result = (Math.round((parseFloat(result) * x)) + 1) / x;
        // 再确认一遍
        result = result.toFixed(n);
      }

      return result;
    };

    if (localStorage.getItem("systype") != null) {
      systype = localStorage.getItem("systype")
    }


    systype = GetQueryString('systype') ? GetQueryString('systype') : systype


    var globalyear = new Date().getFullYear()

    if (localStorage.getItem("globalyear") != null) {
      globalyear = localStorage.getItem("globalyear")
    } else {
      localStorage.setItem("globalyear", globalyear)
    }






    globalyear = GetQueryString('year') ? GetQueryString('year') : globalyear
    var globalUser = []






    if (localStorage.getItem("stationInfo") != null) {
      stationInfo = JSON.parse(localStorage.getItem("stationInfo"))
    }

    stationInfo = GetQueryString('stationInfo') ? JSON.parse(decodeURIComponent(GetQueryString('stationInfo'))) : stationInfo

    if (sessionStorage.getItem("guser") != null) {

      globalUser = JSON.parse(sessionStorage.getItem("guser"))
    }
    if (sessionStorage.getItem("token") != null) {
      Authorization = sessionStorage.getItem("token")
    }

    function gettileInfo2D(TileInfo) {
      return new TileInfo({
        dpi: 90.71428571427429,
        rows: 256,
        cols: 256,
        compressionQuality: 0,
        origin: {
          x: -180,
          y: 90,
        },
        spatialReference: {
          wkid: 4326,
        },
        lods: [
          {
            level: 2,
            levelValue: 2,
            resolution: 0.3515625,
            scale: 147748796.52937502,
          },
          {
            level: 3,
            levelValue: 3,
            resolution: 0.17578125,
            scale: 73874398.264687508,
          },
          {
            level: 4,
            levelValue: 4,
            resolution: 0.087890625,
            scale: 36937199.132343754,
          },
          {
            level: 5,
            levelValue: 5,
            resolution: 0.0439453125,
            scale: 18468599.566171877,
          },
          {
            level: 6,
            levelValue: 6,
            resolution: 0.02197265625,
            scale: 9234299.7830859385,
          },
          {
            level: 7,
            levelValue: 7,
            resolution: 0.010986328125,
            scale: 4617149.8915429693,
          },
          {
            level: 8,
            levelValue: 8,
            resolution: 0.0054931640625,
            scale: 2308574.9457714846,
          },
          {
            level: 9,
            levelValue: 9,
            resolution: 0.00274658203125,
            scale: 1154287.4728857423,
          },
          {
            level: 10,
            levelValue: 10,
            resolution: 0.001373291015625,
            scale: 577143.73644287116,
          },
          {
            level: 11,
            levelValue: 11,
            resolution: 0.0006866455078125,
            scale: 288571.86822143558,
          },
          {
            level: 12,
            levelValue: 12,
            resolution: 0.00034332275390625,
            scale: 144285.93411071779,
          },
          {
            level: 13,
            levelValue: 13,
            resolution: 0.000171661376953125,
            scale: 72142.967055358895,
          },
          {
            level: 14,
            levelValue: 14,
            resolution: 8.58306884765625e-5,
            scale: 36071.483527679447,
          },
          {
            level: 15,
            levelValue: 15,
            resolution: 4.291534423828125e-5,
            scale: 18035.741763839724,
          },
          {
            level: 16,
            levelValue: 16,
            resolution: 2.1457672119140625e-5,
            scale: 9017.8708819198619,
          },
          {
            level: 17,
            levelValue: 17,
            resolution: 1.0728836059570313e-5,
            scale: 4508.9354409599309,
          },
          {
            level: 18,
            levelValue: 18,
            resolution: 5.3644180297851563e-6,
            scale: 2254.4677204799655,
          },
        ],
      });
    }
    var subDomains = ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"];
    var tiaozhuanUrl = "http://120.203.64.203:5888/stbc/web/#/login"
  </script>
</head>
<style type="text/css">
  .el-pagination {
    margin-top: 8px;
  }

  .el-menu-item.is-active {

    background: #fff !important;
    color: #3F8CFF !important;
  }

  .is-opened ul {
    background: #000 !important;
  }

  ::-webkit-scrollbar {

    width: 6px;

    height: 6px;

    background-color: rgba(255, 255, 255, .3);

  }

  /*定义滚动条轨道
	
	内阴影+圆角*/

  ::-webkit-scrollbar-track {

    -webkit-box-shadow: inset 0 0 6px rgba(255, 255, 255, .3);

    border-radius: 20px;

    background-color: rgba(245, 245, 245, .3);

  }

  /*定义滑块
	
	内阴影+圆角*/

  ::-webkit-scrollbar-thumb {

    border-radius: 20px;

    -webkit-box-shadow: inset 0 0 6px rgba(86, 157, 255, .3);

    background-color: rgba(86, 157, 255, .3);

  }

  .preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #fff;
    z-index: 9999;
    transition: opacity .65s
  }



  .preloader-hidden-add {
    opacity: 1;
    display: block
  }

  .preloader-hidden-add-active {
    opacity: 0
  }

  .preloader-hidden {
    display: none
  }

  .cs-loader {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%
  }

  .cs-loader-inner {
    transform: translateY(-50%);
    top: 50%;
    position: absolute;
    width: 100%;
    color: #49a9ee;
    text-align: center
  }

  .cs-loader-inner label {
    font-size: 20px;
    opacity: 0;
    display: inline-block
  }

  .cs-loader-inner label:nth-child(6) {
    animation: lol 3s infinite ease-in-out
  }

  .cs-loader-inner label:nth-child(5) {
    animation: lol 3s .1s infinite ease-in-out
  }

  .cs-loader-inner label:nth-child(4) {
    animation: lol 3s .2s infinite ease-in-out
  }

  .cs-loader-inner label:nth-child(3) {
    animation: lol 3s .3s infinite ease-in-out
  }

  .cs-loader-inner label:nth-child(2) {
    animation: lol 3s .4s infinite ease-in-out
  }

  .cs-loader-inner label:nth-child(1) {
    animation: lol 3s .5s infinite ease-in-out
  }

  @keyframes lol {
    0% {
      opacity: 0;
      transform: translateX(-300px)
    }

    33% {
      opacity: 1;
      transform: translateX(0)
    }

    66% {
      opacity: 1;
      transform: translateX(0)
    }

    100% {
      opacity: 0;
      transform: translateX(300px)
    }
  }
</style>
<div id="loading-icon" class="preloader">
  <div class="cs-loader">
    <div class="cs-loader-inner">
      <label>●</label>
      <label>●</label>
      <label>●</label>
      <label>●</label>
      <label>●</label>
      <label>●</label>
    </div>
  </div>
</div>



<body>
  <link rel="stylesheet" href="https://js.arcgis.com/4.24/esri/themes/light/main.css" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.8.1/gl-matrix.js"></script>
  <script src="./echarts.js"></script>
  <script src="./jiangximapdata.js"></script>
  <script src="./zdata.js"></script>
  <div id="app"></div>
  <script type="module" src="/src/main.js"></script>
</body>




<script>
  document.getElementById("loading-icon").style.display = "none"
</script>


</html>